import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HomeComponent } from './pages/home/home.component';

const routes: Routes = [
  {
    path: 'home',
    component: HomeComponent
  },
  {
    path: 'cd',
    loadChildren: () => import('./pages/change-detection/change-detection.module').then(m => m.ChangeDetectionModule)
  },
  { path: 'zone', loadChildren: () => import('./pages/zone/zone.module').then(m => m.ZoneModule) },
  {
    path: '',
    redirectTo: 'home',
    pathMatch: 'full'
  }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule {
}
